Skip to content

Complain System#22

Open
AsmaAljabri wants to merge 8 commits intomainfrom
feature/asma-5-fetching-data-from-server-for-system
Open

Complain System#22
AsmaAljabri wants to merge 8 commits intomainfrom
feature/asma-5-fetching-data-from-server-for-system

Conversation

@AsmaAljabri
Copy link
Collaborator

@AsmaAljabri AsmaAljabri commented Jul 4, 2025

Complain System/ show name task

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a complaint system for the VoiceVault application, adding both user interface components and functionality for managing complaints. It also includes a simple name display feature.

  • Adds a complaint submission portal with user selection and form handling
  • Creates an admin panel for viewing, filtering, and deleting complaints
  • Implements API integration for user data and complaint management

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
ShowYourName.js Adds animated name display functionality
index.html Updates to include name display element and script
userPortal.html New complaint submission portal with Bootstrap UI
style.css Adds feminine-themed styling for the VoiceVault interface
getusersdata.js Fetches and populates user data from API
getCoplaints.js Retrieves and manages complaint data with filtering functions
filterUserComplains.js Implements complaint filtering by selected user
deleteComplain.js Handles complaint deletion functionality
complaintsView.js Manages complaint display and view population
addUser.js Handles complaint submission form processing
index.html (VoiceVault) Admin panel interface for complaint management
Comments suppressed due to low confidence (2)

examples_src/from_asma/VoiceVault/js/getCoplaints.js:41

  • Parameter name 'filteredcomplains' should follow camelCase convention and be named 'filteredComplaints'.
function showSpecificComplainOptions(filteredcomplains) {

examples_src/from_asma/VoiceVault/js/filterUserComplains.js:8

  • Variable name 'filteredcomplains' should follow camelCase convention and be named 'filteredComplaints'.
    const filteredcomplains = Array.from(complList).filter((OptionObj) => {

document.addEventListener("DOMContentLoaded", function() {
const fullName = "My Name Is Asma ";
const nameParts = fullName.split(" ");
const displayElement = document.getElementById("displyfullName");
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The element ID has a spelling error. 'displyfullName' should be 'displayFullName' to follow proper naming conventions.

Suggested change
const displayElement = document.getElementById("displyfullName");
const displayElement = document.getElementById("displayFullName");

Copilot uses AI. Check for mistakes.
<script src="./js/map_name.js">
</script>

<h1 id="displyfullName"></h1>
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The element ID has a spelling error. 'displyfullName' should be 'displayFullName' to follow proper naming conventions.

Suggested change
<h1 id="displyfullName"></h1>
<h1 id="displayFullName"></h1>

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,46 @@
const complList = document.getElementById('complaintList');
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename has a spelling error. 'getCoplaints.js' should be 'getComplaints.js' for consistency with the word 'complaints'.

Copilot uses AI. Check for mistakes.



function hideComplainsOps(){
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function name has spelling inconsistency. 'hideComplainsOps' should be 'hideComplaintOps' to match the singular form used elsewhere in the codebase.

Suggested change
function hideComplainsOps(){
function hideComplaintOps(){

Copilot uses AI. Check for mistakes.

.btn-feminine {
background-color: #ff69b4 !important;
color: white !important ;
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary whitespace before '!important'. Should be 'color: white !important;' without extra spaces.

Suggested change
color: white !important ;
color: white !important;

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +42
body {
font-family: Arial, sans-serif;
background: #f5f7fa;
min-height: 100vh;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate body selector found. The body styles starting at line 33 should be merged with the existing body styles at line 1 to avoid conflicts and improve maintainability.

Suggested change
body {
font-family: Arial, sans-serif;
background: #f5f7fa;
min-height: 100vh;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* The duplicate body selector has been merged into the first one. */

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,32 @@
//onst complViewDive = document.getElementById("CompaintViewDiv");
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out code should be removed rather than left in the codebase to improve code cleanliness.

Suggested change
//onst complViewDive = document.getElementById("CompaintViewDiv");

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +67
// fetch(`http://localhost:9999/complaints/${SelectedValue}`)
// .then((response) => response.json())
// .then((jsonComplainObject) => {
// compcontent.innerHTML = jsonComplainObject.content;
// })
// .catch((error) => console.error(error));

// complViewDive.innerHTML = "";
// complViewDive.appendChild(heading1);
// complViewDive.appendChild(heading2);
// complViewDive.appendChild(compID);
// complViewDive.appendChild(compcontent);




Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large block of commented out code (lines 52-63) should be removed to improve code cleanliness and maintainability.

Suggested change
// fetch(`http://localhost:9999/complaints/${SelectedValue}`)
// .then((response) => response.json())
// .then((jsonComplainObject) => {
// compcontent.innerHTML = jsonComplainObject.content;
// })
// .catch((error) => console.error(error));
// complViewDive.innerHTML = "";
// complViewDive.appendChild(heading1);
// complViewDive.appendChild(heading2);
// complViewDive.appendChild(compID);
// complViewDive.appendChild(compcontent);
// Removed redundant commented-out code block for improved code cleanliness.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant